package com.leoandroid.tool.toolsbox

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.leoandroid.tool.toolsbox.adapter.ZodiacAdapter
import com.leoandroid.tool.toolsbox.largeread.databinding.ActivityChineseZodiacBinding

class ChineseZodiacActivity:AppCompatActivity(){

    var bindingF:ActivityChineseZodiacBinding?=null
    val binding get() = bindingF!!
    val list:ArrayList<String> = ArrayList()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        bindingF = ActivityChineseZodiacBinding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.includeTitle.backIv.setOnClickListener {
            finish()
        }
        binding.includeTitle.titleTv.text = "生肖"
        list.add("子鼠")
        list.add("丑牛")
        list.add("寅虎")
        list.add("卯兔")
        list.add("辰龙")
        list.add("巳蛇")
        list.add("午马")
        list.add("未羊")
        list.add("申猴")
        list.add("酉鸡")
        list.add("戌狗")
        list.add("亥猪")
        val adapter = ZodiacAdapter(this, list)
        binding.recycleview.layoutManager = LinearLayoutManager(this)
        binding.recycleview.adapter = adapter
    }
}